﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Controls_LeaveHourInput : System.Web.UI.UserControl, IValueControl<TimeSpan>
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    public TimeSpan Value
    {
        get
        {
            return TimeSpan.Parse(string.Format("{0}:{1}", ddlHours.Text, ddlMinutes.Text));
        }
        set
        {
            ddlHours.Text = value.Hours.ToString();
            ddlMinutes.Text = value.Minutes.ToString();
        }
    }
}